package com.ctshk.rpc.user.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

/**
 * <p>
 *
 * </p>
 *
 * @author 李新科
 * @date 2021/6/21 11:10
 */
@Data
@ApiModel()
public class UserTransactionReq {

    @NotBlank(message = "請選擇區號")
    @ApiModelProperty(name="contactMobileAreaCode", value = "聯繫人手機區號", required = true)
    private String contactMobileAreaCode;

    @NotBlank(message = "請輸入聯絡電話")
    @Pattern(regexp = "^[0-9]{8,11}$", message = "手机号必须是纯数字,并且是8到11位")
    @ApiModelProperty(name = "contactNumber", value = "聯絡電話", required = true)
    private String contactNumber;

    @ApiModelProperty(value = "交易点数",required = true)
    private BigDecimal points;

    @ApiModelProperty(value = "交易类型,1.增加积分,2.扣除积分")
    @Min(value = 1,message = "不合法的交易类型")
    @Max(value = 2,message = "不合法的交易类型")
    private Integer transactionType;
}
